import Cookies from 'js-cookie'

const TokenKey = `${process.env.VUE_APP_client_id}-token`
const TokenTypeKey = `${process.env.VUE_APP_client_id}-token-type`
const RefreshTokenKey = `${process.env.VUE_APP_client_id}-refresh-token`

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getTokenType() {
  return Cookies.get(TokenTypeKey)
}

export function setTokenType(type) {
  return Cookies.set(TokenTypeKey, type)
}

export function removeTokenType() {
  return Cookies.remove(TokenTypeKey)
}

export function getRefreshToken() {
  return Cookies.get(RefreshTokenKey)
}

export function setRefreshToken(type) {
  return Cookies.set(RefreshTokenKey, type)
}

export function removeRefreshToken() {
  return Cookies.remove(RefreshTokenKey)
}

